home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / spawno30.zip / SPAWNO.H < prev    next >
C/C++ Source or Header  |  1990-11-03  |  3KB  |  79 lines

  1. /********************************************************************/
  2. /*   SPAWNO v3.0   EMS/XMS/disk swapping replacement for spawn...() */
  3. /*   (c) Copyright 1990 Ralf Brown  All Rights Reserved         */
  4. /*                                    */
  5. /*   May be freely copied provided that this copyright notice is    */
  6. /*   not altered or removed.                        */
  7. /********************************************************************/
  8.  
  9. #ifndef __SPAWNO
  10. #define __SPAWNO
  11.  
  12. #include <stdarg.h>
  13.  
  14. #ifdef M_I86          /* MSC 5.x */
  15. #  define _Cdecl cdecl
  16. #endif /* M_I86 */
  17.  
  18. int _Cdecl spawnvo(const char *overlay_path, const char *name, va_list args) ;
  19. int _Cdecl spawnvpo(const char *overlay_path, const char *name, va_list args) ;
  20. int _Cdecl spawnveo(const char *overlay_path, const char *name, va_list args,const char **env) ;
  21. int _Cdecl spawnvpeo(const char *overlay_path, const char *name, va_list args,const char **env) ;
  22. int _Cdecl spawnlo(const char *overlay_path, const char *name, ...) ;
  23. int _Cdecl spawnlpo(const char *overlay_path, const char *name, ...) ;
  24. int _Cdecl spawnleo(const char *overlay_path, const char *name, ...) ;
  25. int _Cdecl spawnlpeo(const char *overlay_path, const char *name, ...) ;
  26.  
  27. /* this function is normally called only by the spawn...o() functions */
  28. int pascal __spawnv(const char *overlay_path,const char *name,va_list args,int env) ;
  29.  
  30.   /* The following variable determines whether SPAWNO is allowed to use XMS */
  31.   /* memory if available.  Set to 0 to disable XMS, 1 (default) to enable   */
  32. extern char _Cdecl __spawn_xms ;
  33.  
  34.   /* The next variable determines whether SPAWNO is allowed to use EMS        */
  35.   /* memory if available and XMS is either unavailable or disabled.  Set to */
  36.   /* 0 to disable EMS, 1 (default) to enable.                    */
  37. extern char _Cdecl __spawn_ems ;
  38.  
  39.   /* The last variable specifies the number of paragraphs to keep resident  */
  40.   /* while swapped out (default 0 means minimum possible)            */
  41. extern unsigned int _Cdecl __spawn_resident ;
  42.  
  43. /********************************************************************/
  44. /* You may define REPLACE_SPAWN before including this header file   */
  45. /* in order to allow existing code to call the new functions.  You  */
  46. /* should also define OVERLAY_PATH to a string literal or char*     */
  47. /* expression indicating where to store the swap file.            */
  48.  
  49. #ifdef REPLACE_SPAWN
  50.  
  51. #ifdef P_WAIT
  52. #  undef P_WAIT
  53. #endif
  54. #ifdef P_OVERLAY
  55. #  undef P_OVERLAY
  56. #endif
  57.  
  58. #ifndef OVERLAY_PATH
  59. /* use the root directory of the current drive if no path defined */
  60. #  define OVERLAY_PATH "/"
  61. #endif
  62.  
  63. #define spawnl      spawnlo
  64. #define spawnlp   spawnlpo
  65. #define spawnle   spawnleo
  66. #define spawnlpe  spawnlpeo
  67. #define spawnv      spawnvo
  68. #define spawnvp   spawnvpo
  69. #define spawnve   spawnveo
  70. #define spawnvpe  spawnvpeo
  71. #define P_WAIT    OVERLAY_PATH
  72. #define P_OVERLAY OVERLAY_PATH
  73. /* Note: as redefined here, P_OVERLAY has different semantics than the normal */
  74. /*     library function, which never returns on success */
  75.  
  76. #endif /* REPLACE_SPAWN */
  77.  
  78. #endif /* __SPAWNO */
  79.